package ${cfg.parentPackageServer}.consumer;

import ${package.Entity}.${entity};
import ${superServiceClassPackage};

import com.lplb.common.core.constant.base.BaseConstant;
import ${cfg.parentPackage}.dto.${entity}DTO;
import ${cfg.parentPackage}.vo.${entity}VO;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.lplb.common.core.result.R;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;
/**
 * <p>
 * ${table.comment!} 用户端服务接口
 * </p>
 *
 * @author ${author}
 * @date ${date}
 */
@Api(value = "U${table.serviceName}", tags = "yh--${table.comment!}",description= BaseConstant.Sys.USER_TERMINAL)
@RequestMapping(value = "/consumer/${entity?uncap_first}",name = "${table.comment!}")
public interface U${table.serviceName} {


    @RequestMapping(value = "/findPage", method = RequestMethod.GET)
    @ApiOperation("分页查询")
    @ApiImplicitParams({
    @ApiImplicitParam(name = "current", value = "页数", required = true, paramType = "query", example = "1"),
    @ApiImplicitParam(name = "size", value = "记录数", required = true, paramType = "query", example = "20"),
    })
    public R<IPage<${entity}VO>> findPage();


    @RequestMapping(value = "/findList", method = RequestMethod.GET)
    @ApiOperation("查询所有")
    R<List<${entity}VO>> findList();


    @RequestMapping(value = "/findId", method = RequestMethod.GET)
    @ApiOperation("ID查询")
    @ApiImplicitParam(name = "id", value = "主键ID", required = true, paramType = "query")
    public R<${entity}VO> findId(@RequestParam String id);


    @RequestMapping(value = "/add", method = RequestMethod.POST)
    @ApiOperation("添加")
    public R<Void> add(@RequestBody @Validated ${entity}DTO dto);


    @RequestMapping(value = "/upd", method = RequestMethod.PUT)
    @ApiOperation("ID编辑")
    public R<Void> upd(@RequestBody @Validated ${entity}DTO dto);


    @RequestMapping(value = "/removeId", method = RequestMethod.DELETE)
    @ApiOperation("ID删除")
    @ApiImplicitParam(name = "id", value = "主键ID", required = true, paramType = "query")
    public R<Void> removeId(@RequestParam String id);
}
